<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ page import="java.util.*"%>
<%@ page import="BLL.*"%>
<%@ page import="java.sql.Blob"%>
<%@ page import="Model.*"%>
<%@ page import="java.io.*"%>
<%@ page import="org.hibernate.*"%>
<%@ page import="org.apache.commons.fileupload.*"%>
<%@ page import="org.apache.commons.fileupload.disk.DiskFileItemFactory"%>
<%@ page import="org.apache.commons.fileupload.servlet.ServletFileUpload"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>修改后台</title>
</head>
<body>
<%	response.setCharacterEncoding("utf-8");
	int id=Integer.parseInt(request.getParameter("id"));
	String path=request.getParameter("file");
	User u=new User();
	u.setId(id);
	u.setPic(Hibernate.createBlob(new FileInputStream(path)));//图片路径转换成Bolb
	new BLL.UserBLL().picture(u);
	response.sendRedirect("index.jsp?");%>
</body>
</html>